<template>
  <div v-if="ui === 1" class="weui-cells_checkbox" :class="question.style==='h'? 'weui-cells_h':'weui-cells'">
    <label v-for="option in question.options" :key="option.key" :for="option.key" class="weui-cell weui-check__label">
      <div class="weui-cell__hd">
        <input type="checkbox" class="weui-check" :name="question.key" v-model="question.answer" :value="option.key" :id="option.key" />
        <i class="weui-icon-checked"></i>
      </div>
      <div class="weui-cell__bd">
        <view-i-option :option="option"></view-i-option>
      </div>
    </label>
  </div>
  <div v-else-if="ui === 2"></div>
</template>

<script>
  import uuidv4 from 'uuid/v4'
  import ViewIOption from './iOption'
  export default {
    components:{ViewIOption},
    name: "view-i-checkbox",
    props:{
      question:Object,
      ui:{
        type:Number,
        default:1 // 1 weui   2 自定义ui
      }
    },
    data(){
      return {
      }
    },
    created() {
    }
  }
</script>

<style scoped>

</style>
